//
//  LBNetWork.h
//  app
//
//  Created by LINAICAI on 16/6/3.
//  Copyright © 2016年 广东联结电子商务有限公司. All rights reserved.
//  网络监听检测工具

#import <Foundation/Foundation.h>
#import <AFNetworking/AFNetworking.h>
//网络状态监控通知
UIKIT_EXTERN NSString *const LBNetWorkDidChangeNotification;
//网络状态改变趋势
typedef NS_OPTIONS(NSUInteger, LBNetWorkStatusChangeDirection) {
    LBNetWorkStatusChangeDirectionYesToNone = 1 << 0,//有网络到无网络
    LBNetWorkStatusChangeDirectionNoneToYes = 1 << 1,//无网络到有网络
    LBNetWorkStatusChangeDirectionYesToYes = 1 << 2,//运营商和Wifi之间相互切换
    LBNetWorkStatusChangeDirectionNone = 1 << 3,//网络状态没变化
};
@interface LBNetWork : NSObject
@property(nonatomic , assign , readonly)AFNetworkReachabilityStatus status;
@property(nonatomic , strong , readonly)NSString *netWorkType;
+ (instancetype)shared;
//实时检测网络类型
- (void)listenNetWorkStatusChangeHander:(void(^)(AFNetworkReachabilityStatus status , LBNetWorkStatusChangeDirection direction))hander;

@end
